# from DrissionPage import Chromium
# from DrissionPage._elements.chromium_element import ChromiumElement
# from loguru import logger
#
#
# def fetch_golang_versions(browser: Chromium):
#     try:
#         tab = browser.new_tab()
#         tab.get("https://golang.google.cn/dl/")
#
#         downloads_article = tab.ele(".:Downloads")
#         version_blocks = downloads_article.children("#^go")
#         for version_block in version_blocks:
#             _parse_version_block(version_block)
#     except:
#         logger.exception("获取Go语言版本列表异常")
#     finally:
#         tab and tab.close()
#
#
# def _parse_version_block(block: ChromiumElement):
#     # 版本名称
#     version_name = block.child("x:/div/h3/span").text
#     logger.debug(version_name)
#     block.ele(".downloadtable")
